package com.tony.reactiveStream;

import org.reactivestreams.Publisher;
import org.reactivestreams.Subscriber;

/**
 * @version V1.0  </br>
 * @ClassName MyPublisher </br>
 * @Description TODO  </br>
 * @Author tonywang</br>
 * @DATE 3/14/2019 4:48 PM</br>
 */
public class MyPublisher implements Publisher<Employee> {
    @Override
    public void subscribe(Subscriber<? super Employee> s) {
        System.out.println("enter subscribe..." + s);
    }

    public void submit(Employee e) {
        System.out.println("enter submit" + e);
    }

    public void close() {
        System.out.println("enter close, release resource");
    }
}
